package com.zb.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zb.entity.ZjWithdraw;
import com.zb.extend.WithdrawExtend;
import com.zb.mapper.ZjWithdrawMapper;
import com.zb.mobile.WithdrawRecordListSearchMobileVo;
import com.zb.service.ZjWithdrawOrderService;
import com.zb.service.ZjWithdrawService;
import com.zb.vo.WithdrawListSearchVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 提现表 服务实现类
 * </p>
 *
 * @author WEN
 * @since 2024-05-27
 */
@Service
public class ZjWithdrawServiceImpl extends ServiceImpl<ZjWithdrawMapper, ZjWithdraw> implements ZjWithdrawService {
    @Resource
    private ZjWithdrawMapper withdrawMapper;

    // 获取提现单列表
    @Override
    public List<WithdrawExtend> getList(Long custAccId, WithdrawListSearchVo search) {
        return withdrawMapper.getList(custAccId, search);
    }
    // 导出提现单列表
    @Override
    public List<WithdrawExtend> getWithdrawOrderList(Long custAccId, WithdrawListSearchVo search) {
        return withdrawMapper.getWithdrawOrderList(custAccId, search);
    }

    // 获取提现单列表总记录数
    @Override
    public long getListCount(Long custAccId, WithdrawListSearchVo search) {
        return withdrawMapper.getListCount(custAccId, search);
    }

    // 获取提现记录列表
    @Override
    public List<WithdrawExtend> getWithdrawRecordList(Long networkId, Long networkEmpId, WithdrawRecordListSearchMobileVo search) {
        return withdrawMapper.getWithdrawRecordList(networkId, networkEmpId, search);
    }

    // 获取提现记录列表总记录数
    @Override
    public long getWithdrawRecordListCount(Long networkId, Long networkEmpId, WithdrawRecordListSearchMobileVo search) {
        return withdrawMapper.getWithdrawRecordListCount(networkId, networkEmpId, search);
    }

    // 获取已申请提现未审核的金额
    @Override
    public BigDecimal getApplyWithdrawMoney(Long networkId, Long networkEmpId) {
        return withdrawMapper.getApplyWithdrawMoney(networkId, networkEmpId);
    }

    // 获取已提现的累计金额
    @Override
    public BigDecimal getTotalWithdrawMoney(Long networkId, Long networkEmpId) {
        return withdrawMapper.getTotalWithdrawMoney(networkId, networkEmpId);
    }

    // 根据工单ID获取提现单
    @Override
    public ZjWithdraw getByWorkId(Long workId) {
        return withdrawMapper.getByWorkId(workId);
    }
}
